import { createStore, applyMiddleware, combineReducers } from 'redux'
import logger from 'redux-logger'
// 引入 reducer
import { userReduce } from './user/user'
import { cartReducer } from './cart/cart'

// 合并 reducer
const rootReducer = combineReducers({
  user: userReduce,
  cart: cartReducer
})

const store = createStore(rootReducer, applyMiddleware(logger))


export default store



